import moment from "moment"


//处理时间戳过滤器
export function dateTime(v) {
    return moment(v * 1000).format("YYYY-MM-DD")
}

//处理时间戳过滤器
export function dateTime2(v) {
    return moment(v * 1000).format("YYYY-MM-DD HH:mm:ss")
}

//rights权限----grade等级
export function rights(grade) {
    let result = ""
    switch (grade) {
        case "0":
            result = "等级一";
            break;
        case "1":
            result = "等级二";
            break;
        case "2":
            result = "等级三";
            break;
        default:
            result = "暂无等级"
    }
    return result
}
